var wsUrl = "ws://103.21.142.12:8010";
var websocket = new WebSocket(wsUrl);

websocket.onopen = function(){
	console.log('我说:你好服务器');
	websocket.send("你好服务器");
}

websocket.onmessage = function(event){
	console.log('服务器说:'+event.data);
}

websocket.onclose = function(event){
	console.log("close");
}

websocket.onerror = function(event,error){
	console.log('error');
}
